package com.cnc.ssm.model;

import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;

import java.io.Serializable;

/**
 * @author Hibernate CodeGenerator
 */
public class PwMenuRight implements Serializable {

    /**
     * identifier field
     */
    private Long menuRightId;

    /**
     * persistent field
     */
    private String menuCode;

    /**
     * nullable persistent field
     */
    private String refType;

    /**
     * nullable persistent field
     */
    private String refId;

    /**
     * full constructor
     */
    public PwMenuRight(java.lang.Long menuRightId, java.lang.String menuCode, java.lang.String refType, java.lang.String refId) {
        this.menuRightId = menuRightId;
        this.menuCode = menuCode;
        this.refType = refType;
        this.refId = refId;
    }

    /**
     * default constructor
     */
    public PwMenuRight() {
    }

    /**
     * minimal constructor
     */
    public PwMenuRight(java.lang.Long menuRightId, java.lang.String menuCode) {
        this.menuRightId = menuRightId;
        this.menuCode = menuCode;
    }

    public java.lang.Long getMenuRightId() {
        return this.menuRightId;
    }

    public void setMenuRightId(java.lang.Long menuRightId) {
        this.menuRightId = menuRightId;
    }

    public java.lang.String getMenuCode() {
        return this.menuCode;
    }

    public void setMenuCode(java.lang.String menuCode) {
        this.menuCode = menuCode;
    }

    public java.lang.String getRefType() {
        return this.refType;
    }

    public void setRefType(java.lang.String refType) {
        this.refType = refType;
    }

    public java.lang.String getRefId() {
        return this.refId;
    }

    public void setRefId(java.lang.String refId) {
        this.refId = refId;
    }

    public String toString() {
        return new ToStringBuilder(this)
                .append("menuRightId", getMenuRightId())
                .toString();
    }

    public boolean equals(Object other) {
        if (!(other instanceof PwMenuRight)) return false;
        PwMenuRight castOther = (PwMenuRight) other;
        return new EqualsBuilder()
                .append(this.getMenuRightId(), castOther.getMenuRightId())
                .isEquals();
    }

    public int hashCode() {
        return new HashCodeBuilder()
                .append(getMenuRightId())
                .toHashCode();
    }

}
